<template>
  <el-row :gutter="20">
    <el-col :span="6"><info-category @tree-node-click="treeNodeClick" /></el-col>
    <el-col :span="18"><info-attr :catId="catId" /></el-col>
  </el-row>
</template>

<script>
import InfoCategory from '../common/info-category.vue'

export default {
  components: {
    InfoCategory,
    InfoAttr,
  },
  activated() {
    
  },
  data() {
    return {
      catId: 0,
    }
  },
  methods: {
    // 感知 树中 节点被点击
    treeNodeClick(data, node, component){
        console.log("父组件中感知到", data, node)
        console.log("被点击的节点id:", data.catId)
        this.catId = data.catId;
    },
  },
}
</script>

<style>

</style>